home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 January / EnigmA AMIGA RUN 33 (1999)(G.R. Edizioni)(IT)[!][issue 1999-01].iso / earcd / faq / c-faq / diff.z / diff
Text File  |  1999-01-01  |  44KB  |  992 lines

  1. Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.answers,news.answers
  2. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!hookup!usenet.eel.ufl.edu!news.mathworks.com!hunter.premier.net!www.nntp.primenet.com!nntp.primenet.com!news.sprintlink.net!news-stk-200.sprintlink.net!eskimo!scs
  3. From: scs@eskimo.com (Steve Summit)
  4. Subject: comp.lang.c Changes to Answers to Frequently Asked Questions (FAQ)
  5. X-Nntp-Posting-Host: eskimo.com
  6. Message-ID: <1996Sep06.0727.scs.0002@eskimo.com>
  7. Followup-To: poster
  8. Originator: scs@eskimo.com
  9. Sender: news@eskimo.com (News User Id)
  10. Reply-To: scs@eskimo.com
  11. X-Pgp-Signature: Version: 2.6.2
  12.     iQCSAwUBMjA+Pd6sm4I1rmP1AQH5LAPomQthZFXyG6sOboEJPHy5xDLWdiU6vh86
  13.     8j5oH1icPLXn6wvRJ1wvU3rzOuRbE83GEt909c+0qt1qiJbwVeqMHzM4WPy89YNL
  14.     2nsdMvRG9QB46SWfXyoKU64KOIvVsw3HtUGm0OPErBqiHvYAAyzKHdJRCyqmAIbO
  15.     ElHduaY=
  16.     =A7ou
  17. X-Archive-Name: C-faq/diff
  18. Organization: only when absolutely necessary
  19. Date: Fri, 6 Sep 1996 14:28:10 GMT
  20. Approved: news-answers-request@MIT.Edu
  21. Lines: 968
  22. Xref: senator-bedfellow.mit.edu comp.lang.c:203431 comp.lang.c.moderated:5291 comp.answers:20966 news.answers:81117
  23.  
  24. Archive-name: C-faq/diff
  25. Comp-lang-c-archive-name: C-FAQ-list.diff
  26.  
  27. This article contains the significant differences between the
  28. previous version of the comp.lang.c FAQ list (version 3.3, last
  29. modified April 3, 1996, last posted August 1, 1996) and the
  30. current one (version 3.4).  These diffs have been heavily
  31. edited, for readability's sake, and are not suitable as input to
  32. a patch program.
  33.  
  34. In spite of having spent way too much time on this update (and
  35. not even having that many visible changes to show for it), I have
  36. unfortunately not managed to acknowledge all of the suggestions
  37. in the current pile.  Eternal apologies to those of you who have
  38. still not heard from me or seen your suggestion used here, even
  39. after many months.
  40.  
  41. First, here are a few brand-new entries:
  42.  
  43. ==========
  44. > 1.31a: What's wrong with this initialization?
  45. >
  46. >        char *p = malloc(10);
  47. >
  48. >    My compiler is complaining about an "invalid initializer," or
  49. >    something.
  50. >
  51. > A:    Is it in the declaration of a static or non-local variable?
  52. >    Function calls are not allowed in initializers for such
  53. >    variables.
  54. ==========
  55. > 11.2a: Where can I get information about updates to the Standard?
  56. >
  57. > A:    You can find some information at the web sites
  58. >    http://www.lysator.liu.se/c/index.html and http://www.dmk.com/ .
  59. ==========
  60. > 16.2a: I'm getting baffling syntax errors which make no sense at all,
  61. >    and it seems like large chunks of my program aren't being
  62. >    compiled.
  63. >
  64. > A:    Check for unclosed comments or mismatched #if/#ifdef/#ifndef/
  65. >    #else/#endif directives; remember to check header files, too.
  66. >    (See also questions 2.18, 10.9, and 11.29.)
  67. ==========
  68. > 16.2b: Why isn't my procedure call working?  The compiler seems to skip
  69. >    right over it.
  70. >
  71. > A:    Does the code look like this?
  72. >
  73. >        myprocedure;
  74. >
  75. >    C only has functions, and function calls always require
  76. >    parenthesized argument lists, even if empty.  Use
  77. >
  78. >        myprocedure();
  79. ==========
  80. > 18.15c: Where are some collections of useful code fragments and
  81. >    examples?
  82. >
  83. > A:    Bob Stout's "SNIPPETS" collection is available from
  84. >    ftp.brokersys.com in directory pub/snippets or on the web at
  85. >    http://www.brokersys.com/snippets/ .
  86. >
  87. >    Lars Wirzenius's "publib" library is available from ftp.funet.fi
  88. >    in directory pub/languages/C/Publib/.
  89. >
  90. >    See also questions 14.12, 18.9, 18.13, and 18.16.
  91. ==========
  92. > 19.12a: How can I find the modification date and time of a file?
  93. >
  94. > A:    The Unix and POSIX function is stat(), which several other
  95. >    systems supply as well.  (See also question 19.12.)
  96. ==========
  97.  
  98.  
  99. And here are the changes to existing text:
  100.  
  101. ==========
  102. < [Last modified April 3, 1996 by scs.]
  103. ---
  104. > [Last modified September 5, 1996 by scs.]
  105. ==========
  106.   refute.  Several noteworthy books on C are listed in this article's
  107. < bibliography; see also question 18.10.  Many of the questions and
  108. < answers are cross-referenced to these books, for further study by the
  109. < interested and dedicated reader (but beware of ANSI vs. ISO C Standard
  110. < section numbers; see question 11.1).
  111. ---
  112. > bibliography; see also questions 18.9 and 18.10.  Many of the questions
  113. > and answers are cross-referenced to these books, for further study by
  114. > the interested and dedicated reader.
  115. ==========
  116. < This article was last modified on April 3, 1996, and its travels
  117.   may have taken it far from its original home on Usenet.  It may now
  118.   be out-of-date, particularly if you are looking at a printed copy or one
  119. < retrieved from a tertiary archive site or CD-ROM.  You can always obtain
  120. ---
  121. > This article was last modified on September 5, 1996, and its travels
  122.   may have taken it far from its original home on Usenet.  It may now
  123.   be out-of-date, particularly if you are looking at a printed copy or one
  124. > retrieved from a tertiary archive site or CD-ROM.  You should be able to
  125. > obtain the most up-to-date copy by anonymous ftp from sites ftp.eskimo.com,
  126.   rtfm.mit.edu, or ftp.uu.net (see questions 18.16 and 20.40), or by
  127.   sending the e-mail message "help" to mail-server@rtfm.mit.edu .
  128. ==========
  129. < (The question numbers within each section are not continuous because
  130. < they are aligned with the forthcoming book-length version, which
  131. < contains even more questions.)
  132. ---
  133. > (The question numbers within each section are not always continuous,
  134. > because they are aligned with the aforementioned book-length version,
  135. > which contains even more questions.)
  136. ==========
  137. < A:    Variables with "static" duration (that is, those declared
  138. <    outside of functions, and those declared with the storage class
  139. <    static), are guaranteed initialized (just once, at program
  140. <    startup) to zero, as if the programmer had typed "= 0".
  141. <    Therefore, such variables are initialized to the null pointer
  142. ---
  143. > A:    Uninitialized variables with "static" duration (that is, those
  144. >    declared outside of functions, and those declared with the
  145. >    storage class static), are guaranteed to start out as zero, as
  146. >    if the programmer had typed "= 0".  Therefore, such variables
  147. >    are implicitly initialized to the null pointer (of the correct
  148.     type; see also section 5) if they are pointers, and to 0.0 if
  149.     they are floating-point.
  150. ==========
  151.   A:    The first form declares a "structure tag"; the second declares a
  152. <    "typedef".  The main difference is that the second declaration
  153. ---
  154. >    "typedef".  The main difference is that you subsequently refer
  155. >    to the first type as "struct x1" and the second as "x2".  That
  156.     is, the second declaration is of a slightly more abstract type --
  157.     its users don't necessarily know that it is a structure, and
  158.     the keyword struct is not used when declaring instances of it.
  159. ==========
  160.     However, it looks like this technique is disallowed by a strict
  161. <    interpretation of the Standard as well.
  162. ---
  163. >    interpretation of the Standard as well.  Furthermore, either of
  164. >    these "chummy" structures must be used with care, since the
  165. >    programmer knows more about their size than the compiler does.
  166. >    (In particular, they can generally only be manipulated via
  167. >    pointers.)
  168. ==========
  169. < A:    ANSI Standard C allows an initializer for the first member of a
  170. <    union.  There is no standard way of initializing any other
  171. ---
  172. > A:    ANSI Standard C allows an initializer for the first-named member
  173. >    of a union.  There is no standard way of initializing any other
  174. ==========
  175.   3.3:    I've experimented with the code
  176.  
  177. <        [CENSORED]
  178. ---
  179. >        int i = 3;
  180. >        i = i++;
  181.  
  182.     on several compilers.  Some gave i the value 3, some gave 4, but
  183.     one gave 7.  I know the behavior is undefined, but how could it
  184. ==========
  185. < A:    [I apologize for the censorship of the question, but the
  186. <    expression that used to be there was indecent, and by the
  187. <    newly-passed Communications Decency Act of the U.S., I am
  188. <    prohibited from transmitting "indecent" material, whatever that
  189. <    is.  Suffice it to say that the expression tried to modify the
  190. <    same variable twice between sequence points.  --scs]
  191. ==========
  192.     3.9 and 11.33.  (Also, note that neither i++ nor ++i is the same
  193. <    as i+1.  If you want to increment i, use i=i+1 or i++ or ++i,
  194. <    not some combination.  See also question 3.12.)
  195. ---
  196. >    as i+1.  If you want to increment i, use i=i+1, i+=1, i++, or
  197. >    ++i, not some combination.  See also question 3.12.)
  198. ==========
  199.   A:    There is a special exception for those operators (as well as the
  200. <    ?: operator): left-to-right evaluation is guaranteed (as is an
  201. ---
  202. >    ?: and comma operators): left-to-right evaluation is guaranteed
  203.     (as is an intermediate sequence point, see question 3.8).
  204. ==========
  205.   A:    Since the two forms differ only in the value yielded, they are
  206.     entirely equivalent when only their side effect is needed.
  207. >    (However, the prefix form is preferred in C++.)
  208. ==========
  209.   A:    This message, which typically occurs with MS-DOS compilers (see,
  210.     therefore, section 19) means that you've written, via a null
  211. <    (perhaps because uninitialized) pointer, to location 0.
  212. ---
  213. >    (perhaps because uninitialized) pointer, to an invalid location
  214. >    (probably offset 0 in the default data segment).
  215. ==========
  216.     three places past (the start of) the object *named* a, while
  217.     p[3] is three places past the object *pointed to* by p.  In the
  218.     example above, both a[3] and p[3] happen to be the character
  219. <    'l', but the compiler gets there differently.
  220. ---
  221. >    'l', but the compiler gets there differently.  (The essential
  222. >    difference is that the values of an array like a and a pointer
  223. >    like p are computed differently *whenever* they appear in
  224. >    expressions, whether or not they are being subscripted, as
  225. >    explained further in the next question.)
  226. ==========
  227. < 6.14:    How can I set an array's size at compile time?
  228. ---
  229. > 6.14:    How can I set an array's size at run time?
  230.     How can I avoid fixed-sized arrays?
  231. ==========
  232.         #include <stdlib.h>
  233. <        int *dynarray = (int *)malloc(10 * sizeof(int));
  234. ---
  235.         #include <stdlib.h>
  236. >        int *dynarray;
  237. >        dynarray = malloc(10 * sizeof(int));
  238. ==========
  239. <    You can keep the array's contents contiguous, while making later
  240. <    reallocation of individual rows difficult, with a bit of
  241. ---
  242. >    You can keep the array's contents contiguous, at the cost of
  243. >    making later reallocation of individual rows more difficult,
  244.     with a bit of explicit pointer arithmetic:
  245. ==========
  246.     In either case, the elements of the dynamic array can be
  247.     accessed with normal-looking array subscripts: arrayx[i][j] (for
  248. <    0 <= i <= NROWS and 0 <= j <= NCOLUMNS).
  249. ---
  250. >    0 <= i < NROWS and 0 <= j < NCOLUMNS).
  251. ==========
  252.   A:    Before ANSI/ISO Standard C introduced the void * generic pointer
  253.     type, these casts were typically required to silence warnings
  254.     (and perhaps induce conversions) when assigning between
  255. <    incompatible pointer types.  (Under ANSI/ISO Standard C, these
  256. <    casts are no longer necessary.)
  257. ---
  258. >    incompatible pointer types.
  259. >
  260. >    Under ANSI/ISO Standard C, these casts are no longer necessary,
  261. >    and in fact modern practice discourages them, since they can
  262. >    camouflage important warnings which would otherwise be generated
  263. >    if malloc() happened not to be declared correctly; see question
  264. >    7.6 above.
  265. ==========
  266.   A:    It's never necessary to multiply by sizeof(char), since
  267.     sizeof(char) is, by definition, exactly 1.  (On the other hand,
  268. <    multiplying by sizeof(char) doesn't hurt, and may help by
  269. ---
  270. >    multiplying by sizeof(char) doesn't hurt, and in some
  271. >    circumstances may help by introducing a size_t into the
  272.     expression.)  See also question 8.9.
  273. ==========
  274.   A:    When you call free(), the memory pointed to by the passed
  275.     pointer is freed, but the value of the pointer in the caller
  276. <    remains unchanged, because C's pass-by-value semantics mean that
  277. ---
  278. >    probably remains unchanged, because C's pass-by-value semantics
  279.     mean that called functions never permanently change the values
  280.     of their arguments.  (See also question 4.8.)
  281. ==========
  282.   7.23:    I'm allocating structures which contain pointers to other
  283.     dynamically-allocated objects.  When I free a structure, do I
  284. <    have to free each subsidiary pointer first?
  285. ---
  286. >    also have to free each subsidiary pointer?
  287. ==========
  288.   10.15: Is there anything like an #ifdef for typedefs?
  289.  
  290. < A:    Unfortunately, no.  (See also question 10.13.)
  291. ---
  292. > A:    Unfortunately, no.  You may have to keep sets of preprocessor
  293. >    macros (e.g. MY_TYPE_DEFINED) recording whether certain typedefs
  294. >    have been declared.  (See also question 10.13.)
  295. ==========
  296. < 10.23: How can I use a macro argument inside a string literal in the
  297. <    macro expansion?
  298. <
  299. < A:    See question 11.18.
  300. ---
  301. > 10.23-4: I'm having trouble using macro arguments inside string
  302. >    literals, using the `#' operator.
  303. >
  304. > A:    See questions 11.17 and 11.18.
  305. ==========
  306.     It is often better to use a bona-fide function, which can take a
  307.     variable number of arguments in a well-defined way.  See
  308. <    questions 15.4 and 15.5.
  309. ---
  310. >    questions 15.4 and 15.5.  (If you needed a macro replacement,
  311. >    try using a function plus a non-function-like macro, e.g.
  312. >    #define printf myprintf .)
  313. ==========
  314.     internationalization.  The production of Technical Corrigenda is
  315.     an ongoing process, and a second one is expected in late 1995.
  316.     In addition, both ANSI and ISO require periodic review of their
  317. <    standards.  This process is beginning in 1995, and will likely
  318. ---
  319. >    standards.  This process began in 1995, and will likely result
  320.     in a completely revised standard (nicknamed "C9X" on the
  321.     assumption of completion by 1999).
  322. ==========
  323.     assigned to.  The value of a const-qualified object is therefore
  324.     *not* a constant expression in the full sense of the term.  (C
  325.     is unlike C++ in this regard.)  When you need a true compile-
  326. <    time constant, use a preprocessor #define.
  327. ---
  328. >    time constant, use a preprocessor #define (or perhaps an enum).
  329. ==========
  330.   A:    Under ANSI C, the text inside a "turned off" #if, #ifdef, or
  331.     #ifndef must still consist of "valid preprocessing tokens."
  332. <    This means that there must be no newlines inside quotes, and no
  333. <    unterminated comments or quotes (note particularly that an
  334. ---
  335. >    This means that the characters " and ' must each be paired just
  336. >    as in real C code, and the pairs mustn't cross line boundaries.
  337. >    (Note particularly that an apostrophe within a contracted word
  338.     looks like the beginning of a character constant.)  Therefore,
  339.     natural-language comments and pseudocode should always be
  340.     written between the "official" comment delimiters /* and */.
  341. ==========
  342.   A:    The #pragma directive provides a single, well-defined "escape
  343. <    hatch" which can be used for all sorts of implementation-
  344. ---
  345. >    hatch" which can be used for all sorts of (nonportable)
  346.     implementation-specific controls and extensions: source listing
  347.     control, structure packing, warning suppression (like lint's old
  348.     /* NOTREACHED */ comments), etc.
  349. ==========
  350.   11.21: What does "#pragma once" mean?  I found it in some header files.
  351.  
  352.   A:    It is an extension implemented by some preprocessors to help
  353. <    make header files idempotent; it is essentially equivalent to
  354. <    the #ifndef trick mentioned in question 10.7.
  355. ---
  356. >    make header files idempotent; it is equivalent to the #ifndef
  357. >    trick mentioned in question 10.7, though less portable.
  358. ==========
  359.     Finally, are you sure you really need to convert lots of old
  360.     code to ANSI C?  The old-style function syntax is still
  361. <    acceptable, and a hasty conversion can easily introduce bugs.
  362. ---
  363. >    acceptable (except for variadic functions; see section 15), and
  364.     a hasty conversion can easily introduce bugs.
  365. ==========
  366.     (which apply in variable-length argument lists such as
  367.     printf's, whether or not prototypes are in scope), values of
  368.     type float are promoted to double, and printf() therefore sees
  369. <    only doubles.  See also questions 12.13 and 15.2.
  370. ---
  371. >    only doubles.  (printf() does accept %Lf, for long double.)  See
  372. >    also questions 12.13 and 15.2.
  373. ==========
  374.     often useful; see also question 13.6.)  If you do use sscanf(),
  375. <    don't forget to check the return value to make sure that the
  376. <    expected number of items were found.
  377. ---
  378. >    be sure to check the return value to make sure that the expected
  379. >    number of items were found.  Also, if you use %s, be sure to
  380. >    guard against buffer overflow.
  381. ==========
  382. <    strlen() on the string(s) to be inserted.  You can
  383. <    conservatively estimate the size that %d will expand to with
  384. <    code like:
  385. <
  386. <        #include <limits.h>
  387. <        char buf[(sizeof(int) * CHAR_BIT + 2) / 3 + 1 + 1];
  388. <        sprintf(buf, "%d", n);
  389. <
  390. <    (This code computes the number of characters required for a base-
  391. ---
  392. >    strlen() on the string(s) to be inserted.  The number of
  393. >    characters produced by %d is no more than
  394. >
  395. >        ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)  /* +1 for '-' */
  396. >
  397. >    (CHAR_BIT is in <limits.h>), though this computation may be over-
  398. >    conservative.  (It computes the number of characters required for
  399.     a base-8 representation of a number; a base-10 expansion is
  400.     guaranteed to take as much room or less.)
  401. ==========
  402.     (and inadvisable).  A last-ditch technique which is sometimes
  403.     suggested is to use fprintf() to print the same text to a bit
  404.     bucket or temporary file, and then to look at fprintf's return
  405. <    value or the size of the file (but see question 19.12).
  406. ---
  407. >    value or the size of the file (but see question 19.12, and worry
  408. >    about write errors).
  409. ==========
  410.     If there's any chance that the buffer might not be big enough,
  411.     you won't want to call sprintf() without some guarantee that the
  412.     buffer will not overflow and overwrite some other part of
  413. <    memory.  Several stdio's (including GNU and 4.4bsd) provide the
  414. ---
  415. >    memory.  If the format string is known, you can limit %s
  416. >    expansion by using %.Ns for some N, or %.*s (see also question
  417. >    12.10).  Several stdio's (including GNU and 4.4bsd) provide the
  418.     obvious snprintf() function, which can be used like this:
  419. ==========
  420.     output operation goes on to complete successfully, errno still
  421.     contains ENOTTY.  (Note that it is only meaningful for a program
  422.     to inspect the contents of errno after an error has been
  423. <    reported.)
  424. ---
  425. >    reported; errno is not guaranteed to be 0 otherwise.)
  426. ==========
  427. < A:    fgetpos() and fsetpos() use a special typedef, fpos_t, for
  428. <    representing offsets (positions) in a file.  The type behind
  429. <    this typedef, if chosen appropriately, can represent arbitrarily
  430. <    large offsets, allowing fgetpos() and fsetpos() to be used with
  431. <    arbitrarily huge files.  ftell() and fseek(), on the other hand,
  432. <    use long int, and are therefore limited to offsets which can be
  433. <    represented in a long int.  See also question 1.4.
  434. ---
  435. > A:    ftell() and fseek() use type long int to represent offsets
  436. >    (positions) in a file, and are therefore limited to offsets of
  437. >    about 2 billion (2**31-1).  The newer fgetpos() and fsetpos()
  438. >    functions, on the other hand, use a special typedef, fpos_t, to
  439. >    represent the offsets.  The type behind this typedef, if chosen
  440. >    appropriately, can represent arbitrarily large offsets, so
  441. >    fgetpos() and fsetpos() can be used with arbitrarily huge files.
  442. >    See also question 1.4.
  443. ==========
  444.     There is no standard way to discard unread characters from a
  445. <    stdio input stream, nor would such a way be sufficient unread
  446. <    characters can also accumulate in other, OS-level input buffers.
  447. ---
  448. >    stdio input stream, nor would such a way be sufficient, since
  449. >    unread characters can also accumulate in other, OS-level input
  450. >    buffers.  You may be able to read and discard characters until
  451. >    \n, or use the curses flushinp() function, or use some system-
  452. >    specific technique.  See also questions 19.1 and 19.2.
  453. ==========
  454.     an fseek or fflush is always required between reading and
  455.     writing in the read/write "+" modes.  Also, remember that you
  456.     can only overwrite characters with the same number of
  457. <    replacement characters; see also question 19.14.
  458. ---
  459. >    replacement characters, and that overwriting in text mode may
  460. >    truncate the file at that point.  See also question 19.14.
  461. ==========
  462.             const struct mystruct *sp1 = p1;
  463.             const struct mystruct *sp2 = p2;
  464. <            /* now compare sp1->whatever and sp2-> ... */
  465. ---
  466. >            /* now compare sp1->whatever and sp2-> ... */
  467. ==========
  468.     cause overflow.  Note also that at daylight saving time
  469. <    changeovers, local days are not 24 hours long.
  470. ---
  471. >    changeovers, local days are not 24 hours long (so don't assume
  472. >    that division by 86400 will be exact).
  473. ==========
  474. < A:    In some cases (especially if the functions are nonstandard) you
  475. <    may have to explicitly ask for the correct libraries to be
  476. <    searched when you link the program.
  477. ---
  478. > A:    In general, a header file contains only declarations.  In some
  479. >    cases (especially if the functions are nonstandard) you may have
  480. >    to explicitly ask for the correct libraries to be searched when
  481. >    you link the program (#including the header doesn't do that).
  482. ==========
  483. < A:    That message is a quirk of the old Unix linkers.  You only get
  484. <    an error about _end being undefined when other things are
  485. ---
  486. > A:    That message is a quirk of the old Unix linkers.  You get an
  487. >    error about _end being undefined only when other things are
  488.     undefined, too -- fix the others, and the error about _end will
  489.     disappear.
  490. ==========
  491. <        if(fabs(a - b) <= epsilon * a)
  492. ---
  493. >        if(fabs(a - b) <= epsilon * fabs(a))
  494. ==========
  495. <    for some suitably-chosen epsilon.
  496. ---
  497. >    for some suitably-chosen degree of closeness epsilon (as long as
  498. >    a is nonzero!).
  499. ==========
  500. <    This technique won't work properly for negative numbers, though.
  501. ---
  502. >    This technique won't work properly for negative numbers,
  503. >    though (for which you could use something like
  504. >    (int)(x < 0 ? x - 0.5 : x + 0.5)).
  505. ==========
  506.   A:    That constant (which is apparently supposed to be the value of
  507.     pi, accurate to the machine's precision), is not standard.  If
  508. <    you need pi, you'll have to #define it yourself.
  509. ---
  510. >    you need pi, you'll have to #define it yourself, or compute it
  511. >    with 4*atan(1.0).
  512. ==========
  513.   A:    Ajay Shah maintains an index of free numerical software; it is
  514. <    posted periodically, and available where this FAQ list is
  515. <    archived (see question 20.40).
  516. ---
  517. >    posted periodically, and archived in the comp.lang.c directory
  518. >    at rtfm.mit.edu (see question 20.40).
  519. ==========
  520.   14.13: I'm having trouble with a Turbo C program which crashes and says
  521.     something like "floating point formats not linked."
  522.  
  523. < A:    The message in the question has to do with an indecent problem
  524. <    in Borland's compilers, which for some unfathomable reason has
  525. <    still not been fixed.  However, by the newly-passed
  526. <    Communications Decency Act of the U.S., I am prohibited from
  527. <    transmitting or discussing "indecent" material.  (If the fact
  528. <    that users of Borland's compilers are still having this problem
  529. <    isn't indecent, I don't know what is.)  If you send me e-mail
  530. <    certifying that you are over 18 years of age, I may be able to
  531. <    help you.  (You may also be able to see the
  532. ---
  533. > A:    Some compilers for small machines, including Borland's (and
  534. >    Ritchie's original PDP-11 compiler), leave out certain floating
  535. >    point support if it looks like it will not be needed.  In
  536. >    particular, the non-floating-point versions of printf() and
  537. >    scanf() save space by not including code to handle %e, %f, and
  538. >    %g.  It happens that Borland's heuristics for determining
  539. >    whether the program uses floating point are insufficient, and
  540. >    the programmer must sometimes insert an extra, explicit call to
  541. >    a floating-point library routine (such as sqrt(); any will do)
  542. >    to force loading of floating-point support.  (See the
  543.     comp.os.msdos.programmer FAQ list for more information.)
  544. ==========
  545. <    Under a pre-ANSI compiler, rewrite the function definition
  546. <    without a prototype ("char *vstrcat(first) char *first; {"),
  547. <    include <stdio.h> rather than <stdlib.h>, add "extern
  548. <    char *malloc();", and use int instead of size_t.  You may also
  549. <    have to delete the (void) casts, and use the older varargs
  550. <    package instead of stdarg.  See also question 15.7.
  551. ---
  552. >    See also question 15.7.
  553. ==========
  554.   A:    There's an older header, <varargs.h>, which offers about the
  555.     same functionality.
  556.  
  557. <    To rewrite the error() function from question 15.5 to use
  558. <    <varargs.h>, change the function header to:
  559. <
  560. <        void error(va_alist)
  561. <        va_dcl
  562. <        {
  563. <            char *fmt;
  564. <
  565. <    change the va_start line to
  566. <
  567. <        va_start(argp);
  568. <
  569. <    and add the line
  570. <
  571. <        fmt = va_arg(argp, char *);
  572. <
  573. <    between the calls to va_start and vfprintf.  (Note that there is
  574. <    no semicolon after va_dcl.)
  575. ==========
  576.     use va_arg(argp, double).  Similarly, use va_arg(argp, int) to
  577.     retrieve arguments which were originally char, short, or int.
  578. >    (For analogous reasons, the last "fixed" argument, as handed to
  579. >    va_start(), should not be widenable.)
  580. ==========
  581.         omitted declaration of external functions, especially
  582. <        those which return something other than int
  583. ---
  584.         omitted declaration of external functions, especially
  585. >        those which return something other than int, or have
  586. >        "narrow" or variable arguments
  587. ==========
  588.         improper malloc/free use: assuming malloc'ed memory
  589.         contains 0, assuming freed storage persists, freeing
  590. <        something twice (see also questions 7.20 and 7.19)
  591. ---
  592. >        something twice, corrupting the malloc arena (see also
  593. >        questions 7.19 and 7.20)
  594. ==========
  595. <        trying to malloc(256 * 256 * sizeof(double)), especially
  596. ---
  597. >        trying to allocate more memory than an unsigned int can
  598. >        count, especially on machines with limited memory (see
  599.         also questions 7.16 and 19.23)
  600. ==========
  601.   A:    These generally mean that your program tried to access memory it
  602. <    shouldn't have, invariably as a result of improper pointer use.
  603. <    Likely causes are inadvertent use of null pointers (see also
  604. ---
  605. >    shouldn't have, invariably as a result of stack corruption or
  606. >    improper pointer use.  Likely causes are overflow of local
  607. >    ("automatic," stack-allocated) arrays; inadvertent use of null
  608. ==========
  609.     tools to compute code        ccount, Metre, lcount, or
  610.     metrics                csize, or see URL
  611. <                    http://www.qucis.queensu.ca:1999/Software-
  612.                     Engineering/Cmetrics.html ;
  613. ---
  614. >                    http://www.qucis.queensu.ca/Software-
  615.                     Engineering/Cmetrics.html ;
  616. ==========
  617.     a C lines-of-source        this can be done very
  618.     counter                crudely with the standard
  619.                     Unix utility wc, and
  620. <                    considerably better with
  621. ---
  622. >                    somewhat better with
  623.                     grep -c ";"
  624. ==========
  625. >    a C declaration aid        see question 1.21
  626. >    (cdecl)
  627. ==========
  628. <        Sentinel, from AIB Software, 1145 Herndon Pkwy #200, Herndon,
  629. <        VA 22070, USA, 703-787-7700, 800-296-3000, info@aib.com .
  630. ---
  631. >        Final Exam Memory Advisor, from PLATINUM Technology
  632. >        (formerly Sentinel from AIB Software), 1815 South Meyers
  633. >        Rd., Oakbrook Terrace, IL 60181, USA, 630-620-5000,
  634. >        800-442-6861, info@platinum.com, www.platinum.com .
  635. ==========
  636. >        ZeroFault, from The Kernel Group, 1250 Capital of Texas
  637. >        Highway South, Building Three, Suite 601, Austin,
  638. >        TX 78746, 512-433-3333, http://www.tkg.com, zf@tkg.com .
  639. ==========
  640.     archive sites.  An MS-DOS port, djgpp, is also available; it can
  641. <    be found in the Simtel and Oakland archives and probably many
  642. <    others, usually in a directory like pub/msdos/djgpp/ or
  643. <    simtel/msdos/djgpp/.
  644. ---
  645. >    be found at ftp.delorie.com in pub/djgpp, or at the various
  646. >    SimTel mirrors (e.g. ftp.simtel.net in pub/simtelnet/gnu/djgpp;
  647. >    ftp.coast.net in SimTel/vendors/djgpp).
  648. ==========
  649. >    A shareware MS-DOS C compiler is available from
  650. >    ftp.hitech.com.au/hitech/pacific.  Registration is optional for
  651. >    non-commercial use.
  652. ==========
  653.     In the absence of lint, many modern compilers do attempt to
  654. <    diagnose almost as many problems as lint does.
  655. ---
  656. >    diagnose almost as many problems as lint does.  (Many netters
  657. >    recommend gcc -Wall -pedantic .)
  658. ==========
  659.   18.8:    Don't ANSI function prototypes render lint obsolete?
  660.  
  661. < A:    Not really.  First of all, prototypes work only if they are
  662. ---
  663. > A:    No.  First of all, prototypes work only if they are present and
  664. ==========
  665.     The Coronado Enterprises C tutorials are available on Simtel
  666. <    mirrors in pub/msdos/c/.
  667. ---
  668. >    mirrors in pub/msdos/c or on the web at http://www.swcp.com/~dodrill .
  669. ==========
  670. >    Martin Brown has C course material on the web at http://www-
  671. >    isis.ecs.soton.ac.uk/computing/c/Welcome.html .
  672. ==========
  673. >    Finally, the author of this FAQ list teaches a C class and has
  674. >    begun putting its notes on the web; they are at
  675. >    http://www.eskimo.com/~scs/cclass/cclass.html .
  676. ==========
  677. <    [Disclaimer: I have not reviewed these tutorials; I have heard
  678. <    that at least one of them contains a number of errors.  Also,
  679. ---
  680. >    [Disclaimer: I have not reviewed all of these tutorials, and I
  681. >    have heard that at least one of them contains a number of
  682. >    errors.  With the exception of the one with my name on it, I
  683. >    can't vouch for any of them.  Also, this sort of information
  684.     rapidly becomes out-of-date; these addresses may not work by the
  685.     time you read this and try them.]
  686. ==========
  687.     Vinit Carpenter maintains a list of resources for learning C and
  688.     C++; it is posted to comp.lang.c and comp.lang.c++, and archived
  689.     where this FAQ list is (see question 20.40), or on the web at
  690. <    http://vinny.csd.mu.edu/ .
  691. ---
  692. >    http://www.cyberdiem.com/vin/learn.html .
  693. ==========
  694.     K&R's suitability as an initial programming text: many of us did
  695.     learn C from it, and learned it well; some, however, feel that
  696.     it is a bit too clinical as a first tutorial for those without
  697. <    much programming background.
  698. ---
  699. >    much programming background.  Several sets of annotations and
  700. >    errata are available on the net, see e.g.
  701. >    http://www.csd.uwo.ca/~jamie/.Refs/.Footnotes/C-annotes.html,
  702. >    http://www.eskimo.com/~scs/cclass/cclass.html, and
  703. >    http://www.lysator.liu.se/c/c-errata.html#main .
  704. ==========
  705. >    The Association of C and C++ Users (ACCU) maintains a
  706. >    comprehensive set of bibliographic reviews of C/C++ titles, at
  707. >    http://bach.cis.temple.edu/accu/bookcase or
  708. >    http://www.accu.org/accu .
  709. ==========
  710.     If you have access to Usenet, see the regular postings in the
  711.     comp.sources.unix and comp.sources.misc newsgroups, which
  712.     describe the archiving policies for those groups and how to
  713. <    access their archives.  The comp.archives newsgroup contains
  714. ---
  715. >    access their archives, two of which are
  716. >    ftp://gatekeeper.dec.com/pub/usenet/comp.sources.unix/ and
  717. >    ftp://ftp.uu.net/usenet/comp.sources.unix/.  The comp.archives
  718. ==========
  719.     assuming it provides one.  Since comp.lang.c is oriented towards
  720. <    topics that C does deal with, you will usually get better
  721. ---
  722. >    those topics that the C language has defined support for, you
  723.     will usually get better answers to other questions by referring
  724.     to a system-specific newsgroup such as comp.unix.questions or
  725.     comp.os.msdos.programmer, and to the FAQ lists for these groups.
  726. ==========
  727.     For clearing the screen, a halfway portable solution is to print
  728.     a form-feed character ('\f'), which will cause some displays to
  729. <    clear.  Even more portable would be to print enough newlines to
  730. ---
  731. >    clear.  Even more portable might be to print enough newlines to
  732.     scroll everything away.
  733. ==========
  734.     Three possible test routines are stat(), access(), and fopen().
  735. <    (To make an approximate test for file existence with fopen(),
  736. <    just open for reading and close immediately.)  Of these, only
  737. ---
  738. >    (To make an approximate test using fopen(), just open for
  739. >    reading and close immediately, although failure does not
  740. >    necessarily indicate nonexistence.)  Of these, only fopen() is
  741.     widely portable, and access(), where it exists, must be used
  742.     carefully if the program uses the Unix set-UID feature.
  743. ==========
  744.     Under Unix, the stat() call will give you an exact answer.
  745.     Several other systems supply a Unix-like stat() which will give
  746.     an approximate answer.  You can fseek() to the end and then use
  747. <    ftell(), but these tend to have the same problems: fstat() is
  748. ---
  749. >    ftell(), or maybe try fstat(), but these tend to have problems:
  750.     fstat() is not portable, and generally tells you the same thing
  751.     stat() tells you; ftell() is not guaranteed to return a byte
  752.     count except for binary files.
  753. ==========
  754. < A:    There are actually at least two resource limitations on the
  755. ---
  756. > A:    There are typically at least two resource limitations on the
  757.     number of simultaneously open files: the number of low-level
  758.     "file descriptors" or "file handles" available in the operating
  759.     system, and the number of FILE structures available in the stdio
  760. ==========
  761.     to allocate huge amounts of it contiguously.  (The C Standard
  762. <    does not guarantee that a single object can be larger than 32K.)
  763. ---
  764. >    does not guarantee that single objects can be 32K or larger.)
  765. ==========
  766.     If you're using a PC-compatible (8086-based) system, and running
  767. <    up against a 640K limit, consider using "huge" memory model, or
  768. ---
  769. >    up against a 64K or 640K limit, consider using "huge" memory
  770.     model, or expanded or extended memory, or malloc variants such
  771.     as halloc() or farmalloc(), or a 32-bit "flat" compiler (e.g.
  772.     djgpp, see question 18.3), or some kind of a DOS extender, or
  773.     another operating system.
  774. ==========
  775.   A:    Use the library function system(), which does exactly that.
  776. <    Note that system's return value is the command's exit status,
  777. ---
  778. >    Note that system's return value is at best the command's exit
  779. >    status (although even that is not guaranteed), and usually has
  780.     nothing to do with the output of the command.
  781. ==========
  782.     System V and POSIX.  Other routines you might look for on your
  783.     system include clock(), delay(), gettimeofday(), msleep(),
  784. <    nap(), napms(), setitimer(), sleep(), times(), and usleep().
  785. ---
  786. >    nap(), napms(), nanosleep(), setitimer(), sleep(), times(), and
  787.     usleep().
  788. ==========
  789.   A:    You're out of luck.  Either you misunderstood your requirement,
  790.     or it's an impossible one to meet.  ANSI/ISO Standard C simply
  791. <    does not define ways of doing these things.  (POSIX defines a
  792. <    few.)
  793. ---
  794. >    does not define ways of doing these things; it is a language
  795. >    standard, not an operating system standard.  An international
  796. >    standard which does address many of these issues is POSIX
  797. >    (IEEE 1003.1, ISO/IEC 9945-1), and many operating systems (not
  798. >    just Unix) now have POSIX-compatible programming interfaces.
  799. ==========
  800. < 20.13: How can I make my code more efficient?
  801. <
  802. < A:    Efficiency, though a favorite comp.lang.c topic, is not
  803. <    important nearly as often as people tend to think it is.  Most
  804. ---
  805. > 20.13: What's the best way of making my program efficient?
  806. >
  807. > A:    By picking good algorithms, implementing them carefully, and
  808. >    making sure that your program isn't doing any extra work.  For
  809. >    example, the most microoptimized character-copying loop in the
  810. >    world will be beat by code which avoids having to copy
  811. >    characters at all.
  812. >
  813. >    When worrying about efficiency, it's important to keep several
  814. >    things in perspective.  First of all, although efficiency is an
  815. >    enormously popular topic, it is not always as important as
  816. >    people tend to think it is.  Most of the code in most programs
  817.     is not time-critical.   When code is not time-critical, it is
  818.     usually more important that it be written clearly and portably
  819.     than that it be written maximally efficiently.
  820. ==========
  821. <    efficiently.  (Remember that computers are very, very fast, and
  822. <    that even "inefficient" code can run without apparent delay.)
  823. ---
  824. >    than that it be written maximally efficiently.  (Remember that
  825. >    computers are very, very fast, and that seemingly "inefficient"
  826. >    code may be quite efficiently compilable, and run without
  827. >    apparent delay.)
  828. ==========
  829. <    Even for code that *is* time-critical, it is not as important to
  830. <    "microoptimize" the coding details.  Many of the "efficient
  831. ---
  832. >    Even for code that *is* time-critical, one of the least
  833. >    effective optimization techniques is to fuss with the coding
  834. >    details.  Many of the "efficient coding tricks" which are
  835. ==========
  836.     (As it happens, parentheses are optional with the sizeof
  837. <    operator, too, as long as its operand is a variable or a unary
  838. <    expression.)
  839. ---
  840. >    operator, too, under certain circumstances.)
  841. ==========
  842.     many potential uses of nested functions (e.g. qsort comparison
  843.     functions), an adequate if slightly cumbersome solution is to
  844.     use an adjacent function with static declaration, communicating
  845. <    if necessary via a few static variables.  (A cleaner solution
  846. <    when such functions must communicate is to pass around a pointer
  847. ---
  848. >    if necessary via a few static variables.  (A cleaner solution,
  849. >    though unsupported by qsort(), is to pass around a pointer to
  850.     a structure containing the necessary context.)
  851. ==========
  852.     Conversely, ANSI C inherited several features from C++,
  853.     including prototypes and const, so neither language is really a
  854. <    subset or superset of the other.  In spite of the differences,
  855. ---
  856. >    subset or superset of the other; the two also define the meaning
  857. >    of some common constructs differently.  In spite of the
  858. ==========
  859.   A:    Use mktime() or localtime() (see questions 13.13 and 13.14, but
  860.     beware of DST adjustments if tm_hour is 0), or Zeller's
  861.     congruence (see the sci.math FAQ list), or this elegant code by
  862.     Tomohiko Sakamoto:
  863.  
  864.         dayofweek(y, m, d)    /* 0 = Sunday */
  865.         int y, m, d;        /* 1 <= m <= 12, y > 1752 or so */
  866.         {
  867.             static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4};
  868.             y -= m < 3;
  869.             return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7;
  870.         }
  871.  
  872. >        (Copyright 1993, Tomohiko Sakamoto)
  873. ==========
  874.         char*s="char*s=%c%s%c;main(){printf(s,34,s,34);}";
  875.         main(){printf(s,34,s,34);}
  876.  
  877. <    (This program, like many of the genre, assumes that the double-
  878. ---
  879. >    (This program, like many of the genre, neglects to #include
  880. >    <stdio.h>, and assumes that the double-quote character " has the
  881.     value 34, as it does in ASCII.)
  882. ==========
  883. <    Contest winners should be announced at the winter USENIX
  884.     conference in January, and are posted to the net sometime
  885.     thereafter.  Winning entries from previous years (back to 1984)
  886.     are archived at ftp.uu.net (see question 18.16) under the
  887. <    directory pub/ioccc/.
  888. ---
  889. >    Contest winners should be announced at the USENIX conference in
  890.     January, and are posted to the net sometime thereafter.  Winning
  891.     entries from previous years (back to 1984) are archived at
  892.     ftp.uu.net (see question 18.16) under the directory pub/ioccc/;
  893. >    see also http://reality.sgi.com/csp/ioccc/ .
  894. ==========
  895.   A:    You can pronounce the C keyword "char" in at least three ways:
  896. <    like the English words "char," "care," or "car;" the choice is
  897. ---
  898. >    like the English words "char," "care," or "car" (or maybe even
  899. >    "character"); the choice is arbitrary.
  900. ==========
  901. <    An extended version of this FAQ list is being published by
  902. ---
  903. >    An extended version of this FAQ list has been published by
  904.     Addison-Wesley as _C Programming FAQs: Frequently Asked
  905.     Questions_ (ISBN 0-201-84519-9).
  906. ==========
  907. <    It should be available in November 1995.
  908. ==========
  909. >    An errata list is at
  910. >     http://www.eskimo.com/~scs/C-faq/book/Errata.html and on
  911. >     ftp.eskimo.com in u/s/scs/ftp/C-faq/book/Errata .
  912. ==========
  913. <    This list is an evolving document of questions which have been
  914. <    Frequent since before the Great Renaming, not just a collection
  915. <    of this month's interesting questions.  Older copies are
  916. ---
  917. >    This list is an evolving document containing questions which
  918. >    have been Frequent since before the Great Renaming; it is not
  919. >    just a collection of this month's interesting questions.  Older
  920.     copies are obsolete and don't contain much, except the
  921.     occasional typo, that the current list doesn't.
  922. ==========
  923.   Thanks to Jamshid Afshar, David Anderson, Tanner Andrews, Sudheer Apte,
  924.   Joseph Arceneaux, Randall Atkinson, Rick Beem, Peter Bennett, Wayne
  925.   Berke, Dan Bernstein, Tanmoy Bhattacharya, John Bickers, Gary Blaine,
  926. > Yuan Bo, Mark J. Bobak, Dave Boutcher, Alan Bowler, Michael Bresnahan,
  927. > Walter Briscoe, Vincent Broman, Stan Brown, John R. Buchan, Joe Buehler,
  928. > Kimberley Burchett, Gordon Burditt, Scott Burkett, Burkhard Burow, Conor
  929.   P. Cahill, D'Arcy J.M. Cain, Christopher Calabrese, Ian Cargill, Vinit
  930. > Carpenter, Paul Carter, Mike Chambers, Billy Chambless, C. Ron Charlton,
  931.   Franklin Chen, Jonathan Chen, Raymond Chen, Richard Cheung, Steve
  932.   Clamage, Ken Corbin, Ian Cottam, Russ Cox, Jonathan Coxhead, Lee
  933. > Crawford, Nick Cropper, Steve Dahmer, Andrew Daviel, James Davies, John
  934. > E. Davis, Ken Delong, Norm Diamond, Bob Dinse, Jeff Dunlop, Ray Dunn,
  935. > Stephen M. Dunn, Michael J. Eager, Scott Ehrlich, Arno Eigenwillig, Yoav
  936. > Eilat, Dave Eisen, Joe English, Bjorn Engsig, David Evans, Clive D.W.
  937.   Feather, Dominic Feeley, Simao Ferraz, Chris Flatters, Rod Flores,
  938. > Alexander Forst, Steve Fosdick, Jeff Francis, Ken Fuchs, Tom Gambill,
  939.   Dave Gillespie, Samuel Goldstein, Tim Goodwin, Alasdair Grant, Ron
  940. > Guilmette, Doug Gwyn, Michael Hafner, Darrel Hankerson, Tony Hansen,
  941.   Elliotte Rusty Harold, Joe Harrington, Des Herriott, Guy Harris, John
  942. > Hascall, Ger Hobbelt, Jos Horsmeier, Syed Zaeem Hosain, Blair Houghton,
  943.   James C. Hu, Chin Huang, David Hurt, Einar Indridason, Vladimir
  944.   Ivanovic, Jon Jagger, Ke Jin, Kirk Johnson, Larry Jones, Arjan Kenter,
  945. > Bhaktha Keshavachar, James Kew, Darrell Kindred, Lawrence Kirby, Kin-
  946.   ichi Kitano, Peter Klausler, Andrew Koenig, Tom Koenig, Adam Kolawa,
  947. > Jukka Korpela, Ajoy Krishnan T, Jon Krom, Markus Kuhn, Deepak Kulkarni,
  948.   Oliver Laumann, John Lauro, Felix Lee, Mike Lee, Timothy J. Lee, Tony
  949.   Lee, Marty Leisner, Don Libes, Brian Liedtke, Philip Lijnzaad, Keith
  950.   Lindsay, Yen-Wei Liu, Paul Long, Christopher Lott, Tim Love, Tim
  951. > McDaniel, J. Scott McKellar, Kevin McMahon, Stuart MacMartin, John R.
  952.   MacMillan, Andrew Main, Bob Makowski, Evan Manning, Barry Margolin,
  953. > George Matas, Brad Mears, Wayne Mery, De Mickey, Rich Miller, Roger
  954.   Miller, Bill Mitchell, Mark Moraes, Darren Morby, Bernhard Muenzer,
  955.   David Murphy, Walter Murray, Ralf Muschall, Ken Nakata, Todd Nathan,
  956. > Taed Nelson, Landon Curt Noll, Tim Norman, Paul Nulsen, David O'Brien,
  957. > Richard A. O'Keefe, Adam Kolawa, Keith Edward O'hara, James Ojaste, Hans
  958.   Olsson, Bob Peck, Andrew Phillips, Christopher Phillips, Francois
  959. > Pinard, Nick Pitfield, Wayne Pollock, Polver@aol.com, Dan Pop, Claudio
  960. > Potenza, Lutz Prechelt, Lynn Pye, Kevin D. Quitt, Pat Rankin, Arjun Ray,
  961. > Eric S. Raymond, Peter W. Richards, James Robinson, Eric Roode, Manfred
  962.   Rosenboom, J. M. Rosenstock, Rick Rowe, Erkki Ruohtula, John Rushford,
  963.   Kadda Sahnine, Tomohiko Sakamoto, Matthew Saltzman, Rich Salz, Chip
  964.   Salzenberg, Matthew Sams, Paul Sand, DaviD W. Sanderson, Frank Sandy,
  965.   Christopher Sawtell, Jonas Schlein, Paul Schlyter, Doug Schmidt, Rene
  966. > Schmit, Russell Schulz, Dean Schulze, Chris Sears, Peter Seebach,
  967. > Patricia Shanahan, Aaron Sherman, Raymond Shwake, Peter da Silva, Joshua
  968.   Simons, Ross Smith, Henri Socha, Leslie J. Somos, Henry Spencer, David
  969. > Spuler, Frederic Stark, James Stern, Zalman Stern, Michael Sternberg,
  970. > Alan Stokes, Bob Stout, Steve Sullivan, Melanie Summit, Erik Talvola,
  971.   Dave Taylor, Clarke Thatcher, Wayne Throop, Chris Torek, Steve Traugott,
  972.   Ilya Tsindlekht, Andrew Tucker, Goran Uddeborg, Rodrigo Vanegas, Jim Van
  973.   Zandt, Wietse Venema, Tom Verhoeff, Ed Vielmetti, Larry Virden, Chris
  974.   Volpe, Mark Warren, Alan Watson, Kurt Watzka, Larry Weiss, Martin
  975. > Weitzel, Howard West, Tom White, Freek Wiedijk, Tim Wilson, Dik T.
  976.   Winter, Lars Wirzenius, Dave Wolverton, Mitch Wright, Conway Yee, Ozan
  977.   S. Yigit, and Zhuo Zang, who have contributed, directly or indirectly,
  978.   to this article.
  979. ==========
  980. > Thanks to the reviewers of the book-length version:
  981. > Mark Brader, Vinit Carpenter, Stephen Clamage, Jutta Degener, Doug Gwyn,
  982. > Karl Heuer, and Joseph Kent.  Thanks to Debbie Lafferty and Tom Stone at
  983. > Addison-Wesley for encouragment, and permission to cross-pollinate this
  984. > list with new text from the book.
  985. ==========
  986. > Except as noted otherwise, the C code in this article is public domain
  987. > and may be used without restriction.
  988. ==========
  989.  
  990.                     Steve Summit
  991.                     scs@eskimo.com
  992.